package com.ruoyi.wisdom.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.wisdom.mapper.IotSchoolSettingMapper;
import com.ruoyi.wisdom.domain.IotSchoolSetting;
import com.ruoyi.wisdom.service.IIotSchoolSettingService;

/**
 * 学校设置Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-12-31
 */
@Service
public class IotSchoolSettingServiceImpl implements IIotSchoolSettingService 
{
    @Autowired
    private IotSchoolSettingMapper iotSchoolSettingMapper;

    /**
     * 查询学校设置
     * 
     * @param id 学校设置主键
     * @return 学校设置
     */
    @Override
    public IotSchoolSetting selectIotSchoolSettingById(Long id)
    {
        return iotSchoolSettingMapper.selectIotSchoolSettingById(id);
    }

    @Override
    public IotSchoolSetting selectIotSchoolSetting(IotSchoolSetting iotSchoolSetting)
    {
        return iotSchoolSettingMapper.selectIotSchoolSetting(iotSchoolSetting);
    }

    @Override
    public IotSchoolSetting selectIotSchoolSettingByName(String name)
    {
        return iotSchoolSettingMapper.selectIotSchoolSettingByName(name);
    }

    /**
     * 查询学校设置列表
     * 
     * @param iotSchoolSetting 学校设置
     * @return 学校设置
     */
    @Override
    public List<IotSchoolSetting> selectIotSchoolSettingList(IotSchoolSetting iotSchoolSetting)
    {
        return iotSchoolSettingMapper.selectIotSchoolSettingList(iotSchoolSetting);
    }

    /**
     * 新增学校设置
     * 
     * @param iotSchoolSetting 学校设置
     * @return 结果
     */
    @Override
    public int insertIotSchoolSetting(IotSchoolSetting iotSchoolSetting)
    {
        iotSchoolSetting.setCreateTime(DateUtils.getNowDate());
        return iotSchoolSettingMapper.insertIotSchoolSetting(iotSchoolSetting);
    }

    /**
     * 修改学校设置
     * 
     * @param iotSchoolSetting 学校设置
     * @return 结果
     */
    @Override
    public int updateIotSchoolSetting(IotSchoolSetting iotSchoolSetting)
    {
        return iotSchoolSettingMapper.updateIotSchoolSetting(iotSchoolSetting);
    }

    /**
     * 批量删除学校设置
     * 
     * @param ids 需要删除的学校设置主键
     * @return 结果
     */
    @Override
    public int deleteIotSchoolSettingByIds(Long[] ids)
    {
        return iotSchoolSettingMapper.deleteIotSchoolSettingByIds(ids);
    }

    /**
     * 删除学校设置信息
     * 
     * @param id 学校设置主键
     * @return 结果
     */
    @Override
    public int deleteIotSchoolSettingById(Long id)
    {
        return iotSchoolSettingMapper.deleteIotSchoolSettingById(id);
    }

    @Override
    public int deleteIotSchoolSettingByName(String name)
    {
        return iotSchoolSettingMapper.deleteIotSchoolSettingByName(name);
    }
}
